package com.entity;

import java.io.Serializable;

/**
 * @author 
 */
public class Good implements Serializable {
    private Integer gid;

    private String gname;

    private Integer gtypename;

    private Integer sid;

    private String gimag;

    private Integer gprice;

    private String gdescribe;

    private static final long serialVersionUID = 1L;

    public Integer getGid() {
        return gid;
    }

    public void setGid(Integer gid) {
        this.gid = gid;
    }

    public String getGname() {
        return gname;
    }

    public void setGname(String gname) {
        this.gname = gname;
    }

    public Integer getGtypename() {
        return gtypename;
    }

    public void setGtypename(Integer gtypename) {
        this.gtypename = gtypename;
    }

    public Integer getSid() {
        return sid;
    }

    public void setSid(Integer sid) {
        this.sid = sid;
    }

    public String getGimag() {
        return gimag;
    }

    public void setGimag(String gimag) {
        this.gimag = gimag;
    }

    public Integer getGprice() {
        return gprice;
    }

    public void setGprice(Integer gprice) {
        this.gprice = gprice;
    }

    public String getGdescribe() {
        return gdescribe;
    }

    public void setGdescribe(String gdescribe) {
        this.gdescribe = gdescribe;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Good other = (Good) that;
        return (this.getGid() == null ? other.getGid() == null : this.getGid().equals(other.getGid()))
            && (this.getGname() == null ? other.getGname() == null : this.getGname().equals(other.getGname()))
            && (this.getGtypename() == null ? other.getGtypename() == null : this.getGtypename().equals(other.getGtypename()))
            && (this.getSid() == null ? other.getSid() == null : this.getSid().equals(other.getSid()))
            && (this.getGimag() == null ? other.getGimag() == null : this.getGimag().equals(other.getGimag()))
            && (this.getGprice() == null ? other.getGprice() == null : this.getGprice().equals(other.getGprice()))
            && (this.getGdescribe() == null ? other.getGdescribe() == null : this.getGdescribe().equals(other.getGdescribe()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getGid() == null) ? 0 : getGid().hashCode());
        result = prime * result + ((getGname() == null) ? 0 : getGname().hashCode());
        result = prime * result + ((getGtypename() == null) ? 0 : getGtypename().hashCode());
        result = prime * result + ((getSid() == null) ? 0 : getSid().hashCode());
        result = prime * result + ((getGimag() == null) ? 0 : getGimag().hashCode());
        result = prime * result + ((getGprice() == null) ? 0 : getGprice().hashCode());
        result = prime * result + ((getGdescribe() == null) ? 0 : getGdescribe().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", gid=").append(gid);
        sb.append(", gname=").append(gname);
        sb.append(", gtypename=").append(gtypename);
        sb.append(", sid=").append(sid);
        sb.append(", gimag=").append(gimag);
        sb.append(", gprice=").append(gprice);
        sb.append(", gdescribe=").append(gdescribe);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}